package pattern.strategy;

import java.util.Scanner;

public class Student {
    public static void main(String[] args) {
        System.out.print("请输入去学校的方式：1:走去，2：坐公交");
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        Vehicle vehicle = null;
        switch (t) {
            case 1: {
                vehicle = new WalkVehicle();
                break;
            } 
            case 2: {
                vehicle = new BusVehicle();
                break;
            }
            default:
                System.out.println("未实现的方式");
                System.exit(0);
        }
        sc.close();
        Schooling s = new Schooling(vehicle);
        s.goSchool();
    }
}
